//使用for循环求1-10000的和
public class ForSumTest{
	public static void main(String[] args) {
		int sum = 0;
		for (int i = 1; i <= 10000  ; i++ ) {
			System.out.print("i  " + i);
			sum = sum + i;
		}	
		//打印和
		System.out.println();
		System.out.println("sum = " + sum);
	}
}
